<script lang='ts'>
import { h, RendererElement } from 'vue';

export default {

    props: ['title', 'icon'],
    setup(props) {
        const vNode:Array<RendererElement> = []
        const { title, icon } = props
        if(icon) {
            vNode.push(h('i', { class: `iconfont ${icon}`, style: { marginRight: '7px', fontSize: '16px' } }, ''))
        }
        if (title) {
            vNode.push(h('span', {}, title))
        }
        return () => vNode
    }
}
</script>